package com.dayang.nm.ugcaudit.listener;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;

import com.dayang.baseplatform.dao.UgcDbDao;
import com.dayang.baseplatform.jni.CommonDbOperation;
import com.dayang.baseplatform.jni.DbInit;
import com.dayang.baseplatform.model.AcInterface;
import com.dayang.baseplatform.model.AttributeClass;
import com.dayang.baseplatform.util.CommonDbUtil;

public class DataPretreater implements ServletContextListener {
	
	public static Logger logger = Logger.getLogger(DataPretreater.class);
	
	public void contextInitialized(ServletContextEvent sce) {
		
		logger.debug("*********Ugc Audit Start");
		System.out.println(System.getProperty("java.library.path"));
		
		System.loadLibrary("NMUCSDataBaseJNIWrapperUD2");	
		logger.debug("*********loadLibrary:NMUCSDataBaseJNIWrapperUD2");
		
		CommonDbUtil.initDb();
		UgcDbDao ugcDbDao = UgcDbDao.getInstance();
		ugcDbDao.getUgcTaskListByStatus(2, 0, 10);
		
	}
	
	public void contextDestroyed(ServletContextEvent sce) {
		
		logger.debug("*********Ugc Audit Stop");
		
	}
	
}
